import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import SingleOdEdit from '@/components/od/single-od-edit'
import SingleOdSelect from '@/components/od/single-od-select'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/login', component: Login },
  {
    path: '/home',
    component: Home,
    // children: [
    //   { path: '/sos', component: SingleOdSelect, name: 'sos' },
    //   { path: '/soe', component: SingleOdEdit, name: 'soe' }
    // ]
    children: [
      {
        path: '/',
        components: {
          sos: SingleOdSelect,
          soe: SingleOdEdit
        }
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
